﻿#region License
// (c) Intergen.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using TextGlow.Control.Utilities;

namespace TextGlow.Control.UI
{
  public partial class Footer : UserControl
  {
    public Footer()
    {
      InitializeComponent();
    }

    protected override Size ArrangeOverride(Size finalSize)
    {
      // strech bottom line to cover screen
      Rect baseBounds = new Rect(0, finalSize.Height - Base.Height, finalSize.Width, Base.Height);
      Base.SetBounds(baseBounds);

      // center logo and logo background
      Rect logoBounds = new Rect((finalSize.Width - Logo.Width) / 2, finalSize.Height - Logo.Height - Base.Height + 4, Logo.Width, Logo.Height);
      Logo.SetBounds(logoBounds);

      Rect logoBackgroundBounds = new Rect((finalSize.Width - LogoBackground.Width) / 2, finalSize.Height - Logo.Height - Base.Height + 3, LogoBackground.Width, LogoBackground.Height);
      LogoBackground.SetBounds(logoBackgroundBounds);

      return finalSize;
    }
  }
}
